package com.crecheng.shop.DAO;

import java.sql.Time;
import java.sql.Timestamp;

public class UserOderData extends BaseData{
    int uid;//用户id
    int gid;//规格id
    int num;//购买数量
    Timestamp time; //下单时间
    int aid;//地址id
    String psMethod;//配送方式
    String payMethod;//支付方式

    public void set(int uid, int gid, int num, Timestamp time, int aid, String psMethod, String payMethod) {
        this.uid = uid;
        this.gid = gid;
        this.num = num;
        this.time = time;
        this.aid = aid;
        this.psMethod = psMethod;
        this.payMethod = payMethod;
    }

    public void set(int uid, int gid, int num, int aid, String psMethod, String payMethod) {
        this.uid = uid;
        this.gid = gid;
        this.num = num;
        this.time = new Timestamp(System.currentTimeMillis());
        this.aid = aid;
        this.psMethod = psMethod;
        this.payMethod = payMethod;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getGid() {
        return gid;
    }

    public void setGid(int gid) {
        this.gid = gid;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public Timestamp getTime() {
        return time;
    }

    public void setTime(Timestamp time) {
        this.time = time;
    }

    public int getAid() {
        return aid;
    }

    public void setAid(int aid) {
        this.aid = aid;
    }

    public String getPsMethod() {
        return psMethod;
    }

    public void setPsMethod(String psMethod) {
        this.psMethod = psMethod;
    }

    public String getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }

    @Override
    public String toString() {
        return "UserOderData{" +
                "id=" + id +
                ", uid=" + uid +
                ", gid=" + gid +
                ", num=" + num +
                ", time=" + time +
                ", aid=" + aid +
                ", psMethod='" + psMethod + '\'' +
                ", payMethod='" + payMethod + '\'' +
                '}';
    }
}
